65883aa4d9478161d7c526c1f6e1d5f2806da93b,src/test/java/org/apache/commons/csv/CSVPrinterTest.java,CSVPrinterTest,printWithHeaderComments,#StringWriter#Date#CSVFormat#,581
Before Change
private CSVPrinter printWithHeaderComments(final StringWriter sw, final Date now, final CSVFormat baseFormat)
throws IOException {
CSVFormat format = baseFormat.withCommentMarker('#').withHeader("Col1", "Col2");
format = format.withHeaderComments("Generated by Apache Commons CSV 1.1", now);
final CSVPrinter csvPrinter = format.print(sw);
csvPrinter.printRecord("A", "B");
After Change
CSVFormat format = baseFormat;
// Use withHeaderComments first to test CSV-145
format = format.withHeaderComments("Generated by Apache Commons CSV 1.1", now);
format = format.withCommentMarker('#');
format = format.withHeader("Col1", "Col2");
final CSVPrinter csvPrinter = format.print(sw);
csvPrinter.printRecord("A", "B");